package br.ufmg.dcc.vod.remoteworkers.async;

import java.io.Serializable;

import br.ufmg.dcc.vod.remoteworkers.CommandError;

class Response<T, I> implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private final I id;
	private final T response;
	private final boolean isError;
	private final CommandError error;

	public Response(boolean isError, I id, T response, CommandError error) {
		this.isError = isError;
		this.id = id;
		this.error = error;
		this.response = response;
	}
	
	public T getResponse() {
		return response;
	}
	
	public boolean isError() {
		return isError;
	}
	
	public CommandError getError() {
		return error;
	}
	
	public I getId() {
		return id;
	}
}
